﻿<UserControl x:Class="PocketBook.Views.Designs.SuDoKuPageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="350">
    <DockPanel Margin="10">
        <Border BorderThickness="0,0,0,1" DockPanel.Dock="Top" Padding="4" BorderBrush="Black">
            <TextBlock FontFamily="Georgia" FontSize="14pt" FontWeight="Bold" Text="SuDoKu"  />
        </Border>
            <Border BorderThickness="1,1,0,0" BorderBrush="LightBlue" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Grid Width="225" Height="225">
                    <Grid.Resources>
                        <Style TargetType="{x:Type Border}">
                        <Setter Property="BorderBrush" Value="LightBlue" />
                    </Style>
                    </Grid.Resources>

                    <Rectangle>
                        <Rectangle.Fill>
                            <VisualBrush TileMode="Tile" Stretch="Uniform" Viewport="0,0,150,150" ViewportUnits="Absolute">
                                <VisualBrush.Visual>
                                    <Grid Width="150" Height="150" Background="White">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>
                                        <Rectangle Grid.Row="0" Grid.Column="1" Fill="AliceBlue" StrokeThickness="0" />
                                    <Rectangle Grid.Row="1" Grid.Column="0" Fill="AliceBlue" StrokeThickness="0" />
                                    </Grid>
                                </VisualBrush.Visual>
                            </VisualBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <Rectangle>
                        <Rectangle.Fill>
                            <VisualBrush x:Name="GridBrush"  TileMode="Tile" Stretch="Uniform" Viewport="0,0,25,25" ViewportUnits="Absolute">
                                <VisualBrush.Visual>
                                    <Border Width="25" Height="25" BorderThickness="0,0,1,1" />
                                </VisualBrush.Visual>
                            </VisualBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <Rectangle>
                        <Rectangle.Fill>
                            <VisualBrush TileMode="Tile" Stretch="Uniform" Viewport="0,0,75,75" ViewportUnits="Absolute">
                                <VisualBrush.Visual>
                                    <Border Width="75" Height="75" BorderThickness="0,0,1.5,1.5" />
                                </VisualBrush.Visual>
                            </VisualBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <ItemsControl x:Name="Values" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <UniformGrid Columns="9" Rows="9" />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                            <Border Height="25">
                                <TextBlock FontSize="16" Foreground="Crimson" Text="{Binding}" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="0,0,0,2" />
                            </Border>
                        </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Grid>
            </Border>
    </DockPanel>
</UserControl>
